package com.xpsoft.oa.service.project.impl;


import org.apache.commons.lang.StringUtils;

import com.xpsoft.core.service.impl.BaseServiceImpl;
import com.xpsoft.oa.dao.project.ProjectRegisterDao;
import com.xpsoft.oa.model.project.ProjectRegister;
import com.xpsoft.oa.service.project.ProjectRegisterService;

public class ProjectRegisterServiceImpl extends BaseServiceImpl<ProjectRegister> implements ProjectRegisterService{
	private ProjectRegisterDao dao;
	
	public ProjectRegisterServiceImpl(ProjectRegisterDao dao) {
		super(dao);
		this.dao=dao;
	}

	@Override
	public void editStatus(String ids[], String status) {
		// TODO Auto-generated method stub
		for(String id:ids){
			if(StringUtils.isNotBlank(id)){
				ProjectRegister projectRegister = dao.get(Long.valueOf(id));
				if(StringUtils.isNotBlank(status)){
					projectRegister.setStatus(Integer.valueOf(status));
					dao.save(projectRegister);
				}
			}
		}
	}

	
}